<%@page import="com.neiquan.backstage.pub.bsc.dao.po.Payment"%>
<%@page import="com.neiquan.backstage.pub.bsc.dao.po.Entrepreneur"%>
<%@page import="com.neiquan.backstage.resourec_manage.EntrepreneurService"%>
<%@page import="com.neiquan.backstage.resourec_manage.PaymentService"%>
<%@page import="com.neiquan.backstage.user.UserService"%>
<%@page import="com.neiquan.backstage.pub.bsc.dao.po.User"%>
<%@page import="com.neiquan.backstage.common.util.Sessions"%>
<%@page import="java.util.List"%>
<%@page import="com.neiquan.backstage.common.CommonService"%>
<%@page import="com.neiquan.backstage.common.util.SpringContextUtils"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
ApplicationContext appCtx = SpringContextUtils.getApplicationContext();
CommonService commonService = appCtx.getBean(CommonService.class);
PaymentService paymentService = appCtx.getBean(PaymentService.class);
EntrepreneurService entrepreneurService = appCtx.getBean(EntrepreneurService.class);
User loginedUser = (User) Sessions.getLoginedUser(session);
int memberId=loginedUser.getMemberId();
String uniqueId=loginedUser.getEntrepreneurUniqueId();
Entrepreneur entityE=entrepreneurService.queryByUniqueId(uniqueId, memberId);
int entrepreneurId=entityE.getEntrepreneurId();
List<Payment> listP= paymentService.queryByEentrepreneurId(entrepreneurId);
pageContext.setAttribute("listP", listP);
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	<title>月租缴费记录</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1.0" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<link rel="stylesheet" href="css/base.css" />
	<link rel="stylesheet" href="css/main.css" />
</head>
<body bgcolor="#f0f0f0">
		<section class="common_bg manager_wrap">
			<!--<ul>
				<li class="manager_title">
					<span>时间</span>
					<span>金额</span>
				</li>
				<%for(Payment p:listP){%>
					<li class="manager_title manager_list record_cont">
					<span><%=commonService.formatTimestamp(p.getStratTime(),"yyyy-MM-dd hh:mm")%> </span>
					<span><%=p.getTotalRent() %></span>
				</li>
				<%} %>
			</ul>-->
			<ul class="record_ul">
				<li class="record_title record_list">
					<span class="fl">时间</span>
					<span class="fr">金额</span>
				</li>
				<%for(Payment p:listP){%>
					<li class="record_list record_cont">
						<span class="fl"><%=commonService.formatTimestamp(p.getStratTime(),"yyyy-MM-dd hh:mm")%> </span>
						<span class="fr"><%=p.getTotalRent() %></span>
					</li>
				<%} %>
			</ul>
		</section>
</body>
		<script src="js/jquery.min.js"></script>
		<script src="js/main.js"></script>
		<script src="js/responsive.js"></script>
</html>
